$(function () {

// Create the chart
    $("button").click(function () {
        var project = [];
        $("input#pro_id").each(function(){
           if($(this).attr("checked")){
               project.push($(this).val())
           }
        });
        var pro_str = project.join(',');
        console.log(project);
        $.get("/gitproject/every_total", {
            from_date: $("#from_date").val(),
            to_date: $("#to_date").val(),
            project:pro_str
        }, function (data) {
            $('#container').highcharts({
                chart: {
                    type: 'column'
                },
                title: {
                    text: 'everyone total add line number'
                },
                xAxis: {
                    categories: data.users
                },
                yAxis: {
                    title: {
                        text: "line number"
                    }
                },
                legend: {
                    enabled: "true"
                },

                plotOptions: {
                    series: {
                        borderWidth: 0,
                        dataLabels: {
                            enabled: true
                        }
                    }
                },

                series: [{
                    name: 'add',
                    color: 'red',
                    data: data.add
                }, {
                    name: 'files',
                    color:'blue',
                    data: data.files
                }, {
                    name: 'remove',
                    color:'black',
                    data: data.remove
                }],

                drilldown: {
                    series: []
                }
            });
        });
    });
}, "json");
/**
 * Created by Administrator on 2015/11/25.
 */
/**
 * Created by Administrator on 2015/11/27.
 */
